/**
 * 服务
 * */
package org.zmhhxl.user.service;




import org.zmhhxl.api.auth.domain.entity.Role;
import org.zmhhxl.api.auth.domain.entity.dto.RoleDTO;

import java.util.List;

public interface RoleService {

   /**
    * Save role.
    *
    * @param role the role
    * @return the role
    */
   Role save(Role role);

   /**
    * Update role.
    *
    * @param role the role
    * @return the role
    */
   Role update(Role role);

   /**
    * Find by role id role.
    *
    * @param roleId the role id
    * @return the role
    */
   Role findById(Long roleId);

   Role findByRoleName(String roleName);

   /**
    * Delete by id.
    *
    * @param roleId the role id
    */
   void deleteById(Long roleId);

   /**
    * Bind permissions.
    *
    * @param rolePermissionDTO the role permission dto
    */
   //void bindPermissions(RolePermissionDTO rolePermissionDTO);\

//   void unbindPermissions(RoleDTO roleDTO);

//      void bindUser(RoleDTO roleDTO);
//      void bindUser(Long roleId, Long userId);
//      void unbindUser(Long roleId, Long userId);
//      void unbindUser(RoleDTO roleDTO);

      //List<Role> findByUserId(Long userId);

   /**
    * Page page.
    *
    * @param page  the page
    * @param limit the limit
    * @return the page
    */
   //Page<Role> page(Integer page, Integer limit);

   /**
    * role tree data list.
    *
    * @param userId the user id
    * @return the list
    */
   List<RoleDTO> roleTreeData(String userId);
}
